package com.gg.registration.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gg.registration.model.order.OrderInfo;
import com.gg.registration.model.order.PaymentInfo;

import java.util.Map;

/**
 * Author：  chenjunjia
 * Date：    2022/4/27 21:16
 * WeChat：  China_JoJo_
 */
public interface PaymentInfoService extends IService<PaymentInfo> {
    /**
     * 保存消费记录
     * @param orderInfo
     * @param type
     */
    void savePaymentInfo(OrderInfo orderInfo, Integer type);

    /**
     * 完成支付
     * @param outTradeNo
     * @param status
     * @param resultMap
     */
    void paySuccess(String outTradeNo, Integer status, Map<String, String> resultMap);

    /**
     * 获取消费记录
     * @param orderId
     * @param paymentType
     * @return
     */
    PaymentInfo getPaymentInfo(Long orderId, Integer paymentType);
}
